<!DOCTYPE HTML>
<html>
	<head>

		<title>Blogs | TFT</title>
		
		<link rel="icon" href="favicon.ico"> 
		<link href="css/styles.css" rel="stylesheet" type="text/css" media="screen">
		<link href="css/blogs.css" rel="stylesheet" type="text/css" media="screen">
		<link href="css/jquery-blacktie-ui.css" rel="stylesheet" type="text/css" media="screen">	
		
		<script type="text/javascript" src="js/jquery.js"></script>
		<script type="text/javascript" src="js/jquery-ui.js"></script>
    	<script type="text/javascript" src="js/menu.js"></script>
	</head>

	<body>		
		<div id="wrapper">	
			<div id="upperbar">
			
				<div id="logo">
						<img src="images/logo.png" alt="That Friday Thing"/>
				</div>
					
				<div id="social">
					<ul>
						<li><a href="https://www.facebook.com/thatfridaything">
						<img src="images/icons/facebook.png"></a></li>
						<li><a href="https://twitter.com/thatfridaything">
						<img src="images/icons/twitter-2.png"></a></li>
					</ul>	
				</div>					
		
				<div id="menu">			
				    <ul class="menu">
				        <li id="index"			>
						<a href="index.html"><span>Welcome</span></a></li>
				        <li id="get_connected"  >
						<a href="get_connected.php"><span>Get Connected</span></a></li>
				        <li id="blogs"          >
						<a href="blogs.php"><span>Blogs</span></a></li>
				        <li class="parent"		>
						<a href="media.html"><span>Media</span></a>
				        	<div>
				        		<ul>
				        			<li><a href="#"><span>PODCASTS</span></a></li>
				        			<li><a href="#"><span>PHOTOS</span></a></li>
									<li><a href="#"><span>VIDEOS</span></a></li>
				        		</ul>
				        	</div>
				        </li>
				    </ul>
				</div>				
			</div>
					
			<script type="text/javascript">
				document.getElementById("blogs").className= "current";
			</script>
			        	
			<div id="content">
				<?php
					$pages_dir = 'blogs';
					$pages = scandir($pages_dir, 0);
				
					if(!empty($_GET['p']))
					{
						unset($pages[0], $pages[1]);
						$p = $_GET['p'];
						
						if(in_array($p.'.blog.php', $pages))
						{
							include($pages_dir.'/'.$p.'.blog.php');
						}
						else
							echo 'Not found';						
					}
					
					else
					{
						include($pages_dir.'/home.blog.php');
					}
				?>		
			</div>
			
			<div id="sidebar">
							
			</div>
			
			<div id="footer">
				<hr/>
				<a href="http://victoryfort.org">
				<img id="footerIcon" src="images/footer_icon.png"></a>
				
				<div id="bottomText">
				
					<span id="bottomLinks">
						<a href="#">Welcome</a> | <a href="#">Get Connected</a> | <a href="#">Events</a> | <a href="#">Gallery</a> | <a href="#">Resources</a>
					</span>
				
					<div id="info">
						<p>That Friday Thing is part of the youth ministry of <a href="http://victoryfort.org">Victory Fort Bonifacio</a></p>
						<p>32nd St. corner University Parkway, Bonifacio Global City, Taguig 1634 Philippines<p>
						<p>&copy; 2012 That Friday Thing<p>
						
						<span hidden="hidden">Navigation Menu from <a href="http://apycom.com/">Apycom jQuery Menus</a></span>
					</div>
					
				</div>
			</div>
		</div>		
	</body>
</html>
